<template>
  <div>
    <FootComponen></FootComponen>
    <div class="app-root">
      <div class="page-mine">
        <div class="userinfo">
          <img src="../../public/assets/images/tx.jpg" alt="" class="avatar" />
          <div class="name">15914805248</div>
          <div class="change-account" @click="getout">退出登录</div>
        </div>

        <div class="card">
          <div class="card-placeholder"></div>
          <div class="card-content">
            <div class="top">
              <div class="top-left">男衣邦・黑卡</div>
              <div class="top-right">ID:2877501</div>
            </div>
            <div>
              <div class="title">黑卡会员</div>
              <div class="sub-title">只为闪耀的少数派服务</div>
            </div>
            <div class="bottom" @click="Jump_member" v-if="!wdyh">
              <span>你还不是会员哦<span class="renew">立即加入</span></span>
            </div>
             <div class="bottom" @click="Jump_member" v-if="wdyh">
              <span>已成为高贵的会员</span>
            </div>
          </div>
        </div>
        <div class="head"><span class="icon icon-bookmark"></span><span class="text1">我的工具</span></div>

        <div class="body">
          <!-- <hr class="comp-sep" />
          <a href="javascript:;"
           ><div class="cell">
              <span class="icon icon-mine-cart"></span
              ><span class="text">消费返利</span
              ><span class="go-icon icon-right-open"></span></div
          ></a> -->
          <hr class="comp-sep" />
          <a href="javascript:;"
           @click="Jump_path('purch')"><div class="cell">
              <span class="icon icon-mine-order"></span
              ><span class="text">我的订单</span
              ><span class="jt"></span></div
          ></a>
          <hr class="comp-sep" />
    
          <a href="javascript:;"
            @click="Jump_path('ress')"      ><div class="cell">
              <span class="icon icon-mine-cart"></span
              ><span class="text">我的地址</span
              ><span class="jt"></span></div
          ></a>
          <hr class="comp-sep" />
              <a href="javascript:;"
               @click="Jump_path('colle')"
           ><div class="cell">
              <span class="icon icon-mine-cart"></span
              ><span class="text">收藏</span
              ><span class="jt"></span></div
          ></a>
          <hr class="comp-sep" />
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import FootComponen from "../components/FootComponen.vue";
export default {

  data() {
    return {
      wdyh:false
    }
  },
  components: {
    FootComponen,
  },
  methods: {
      Jump_path(n) {
      this.$router.push({name:n})
    },
    Jump_member(){
            this.$router.push({name:'member'})
    },
    //退出登录
        getout(){
        window.localStorage.removeItem('token')
        window.localStorage.removeItem('userId')
        this.$router.push({name:"home"})
    }
  },
  created() {
       if (window.localStorage.getItem("hylist") == null) {
      window.localStorage.setItem("hylist", "[]");
    }
       let hylist = window.localStorage.getItem("hylist");
          hylist = JSON.parse(hylist);
        if(hylist.length>=1){
            this.wdyh=hylist[0]
        }
    console.log(this.wdyh);

  },
};
</script>
<style scoped>
.page-mine {
  padding-bottom: 50px;
}
.page-mine .userinfo {
  height: 60px;
  margin: 20px 12px;
  overflow: hidden;
  position: relative;
}
.page-mine .userinfo .avatar {
  display: block;
  width: 60px;
  height: 60px;
  border-radius: 30px;
}
img {
  pointer-events: none;
}
.page-mine .userinfo .name {
  position: absolute;
  left: 72px;
  top: 0;
  right: 0;
  bottom: 0;
  display: block;
  font-size: 22px;
  color: #595c61;
  height: 60px;
  line-height: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.page-mine .userinfo .change-account,
.page-mine .userinfo .not-login {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  font-size: 13px;
  color: #a9acb3;
  height: 60px;
  line-height: 60px;
}
.page-mine .userinfo .avatar {
  display: block;
  width: 60px;
  height: 60px;
  border-radius: 30px;
}
.page-mine .card {
  position: relative;
  margin: 12px;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 0 8px 0 rgb(0 0 0 / 30%);
}
.page-mine .card .card-placeholder {
  display: block;
  height: 0;
  padding-bottom: 61%;
}
.page-mine .card .card-content {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  color: #9194a6;
  background: url()
      no-repeat 128% 75% / auto 75% content-box padding-box,
    linear-gradient(40deg, rgba(84, 89, 112, 0) 20%, #2f3241 80%),
    linear-gradient(
      110deg,
      #52566e,
      #464b61 30%,
      #42465a 0,
      #343849 60%,
      #2e3140 0,
      #202029 90%,
      #272732 0
    );
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  padding: 12px;
}
.page-mine .card .card-content .top {
  width: 100%;
  text-align: left;
}
.page-mine .card .card-content .top .top-left {
  display: inline-block;
  padding: 0 10px;
  background-color: rgba(0, 0, 0, 0.2);
  font-size: 12px;
  line-height: 22px;
  border-radius: 11px;
}
.page-mine .card .card-content .top .top-right {
  float: right;
  line-height: 22px;
  -webkit-user-select: all;
}
.page-mine .card .card-content .title {
  color: #e8d2a9;
  font-size: 22px;
  margin-bottom: 10px;
  background-image: linear-gradient(0deg, #f4ecd0, #d4b382);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.page-mine .card .card-content .sub-title {
  font-size: 18px;
}
.page-mine .card .card-content .bottom {
  width: 100%;
  text-align: left;
  font-size: 13px;
}
.page-mine .card .card-content .bottom .renew {
  display: inline-block;
  line-height: 20px;
  font-size: 12px;
  border-radius: 10px;
  padding: 0 8px;
  margin-left: 8px;
  color: #000;
  background-image: linear-gradient(0deg, #e4c079, #ffe393);
}
.page-mine .benefits {
  margin: 12px 0;
}
.page-mine .benefits .head {
  height: 44px;
  line-height: 44px;
  font-size: 20px;
  color: #000c18;
  margin-left: 4px;
 font-weight: 400 !important;
}
.page-mine .benefits .head .icon {
  color: #5a75d6;
}
.icon-bookmark:before {
  content: "\e819";
}
[class*=" icon-"]:before,
[class^="icon-"]:before {
  font-family: icomoon !important;
  speak: none;
  font-style: normal;
  font-weight: 400;
  font-variant: normal;
  text-transform: none;
  display: inline-block;
  text-decoration: inherit;
  width: 1em;
  line-height: 1em;
  margin-left: 0.2em;
  margin-right: 0.2em;
  text-align: center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.page-mine .benefits .body {
  padding-top: 8px;
  margin: 0 12px;
}

ul {
  list-style: none;
}
.page-mine .benefits .body li {
  display: inline-block;
  width: 25%;
  font-size: 0;
}
.page-mine .benefits .body li .icon {
  margin: 12px auto;
  font-size: 22px;
  width: 36px;
  height: 36px;
  border-radius: 18px;
  padding-top: 7px;
  background-color: #f5f1e6;
  color: #e8d2a9;
  position: relative;
}
.page-mine .benefits .body li .text {
  height: 32px;
  font-size: 15px;
  color: #595c61;
}
.page-mine .benefits .body li .icon,
.page-mine .benefits .body li .text {
  display: block;
  margin: 0 auto;
  text-align: center;
}
.comp-sep {
  border: none;
  height: 1px;
  position: relative;
  background-color: #e5e5e5;
}
.comp-sep:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
  border: solid #e5e5e5;
  border-width: 0 0 0.5px;
}
.page-mine .benefits .body li .icon {
  margin: 12px auto;
  font-size: 22px;
  width: 36px;
  height: 36px;
  border-radius: 18px;
  padding-top: 7px;
  background-color: #f5f1e6;
  color: #e8d2a9;
  position: relative;
}
.page-mine .orders .head {
  height: 44px;
  line-height: 44px;
  font-size: 18px;
  color: #000c18;
  margin-left: 4px;
}
.page-mine .orders .body {
    padding-top: 8px;
    font-size: 15px;
    color: #595c61;
}
a {
    text-decoration: none;
}

a, body {
    color: #595c61;
}
.comp-sep {
    border: none;
    height: 1px;
    position: relative;
}
 .cell {
  position: relative;
    height: 44px;
    line-height: 44px;
    padding-left: 24px;
    padding-right: 12px;
}
.page-mine .orders .body .cell .icon {
    margin-right: 6px;
    font-size: 18px;
}
.page-mine .orders .body .go-icon {
    float: right;
    color: #a9acb3;
}
.text1{
   font-weight: 400 !important;
   font-size: 20px;
}
.jt{
     width: 8px;
    height: 17px;
    right: 12px;
    top: 15px;
  position: absolute;
  display: block;
  background: url(../../public/assets/images/ic_arrow_home.png) no-repeat;
background-size: 100% 100%;
}

</style>